package com.ruoyi.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 停车订单对象 parking_order
 * 
 * @author dongdong
 * @date 2025-08-20
 */
public class ParkingOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 订单状态：1-进行中 2-待支付 3-已支付 4-已完成 5-已取消 6-已退款 */
    @Excel(name = "订单状态")
    private Integer orderStatus;

    /** 订单类型 */
    @Excel(name = "订单类型")
    private Integer orderType;

    /** 停车场ID */
    @Excel(name = "停车场ID")
    private Long parkId;

    /** 停车场Code */
    @Excel(name = "停车场Code")
    private String parkCode;

    /** 停车场名称 */
    @Excel(name = "停车场名称")
    private String parkName;

    /** 停车区域ID */
    @Excel(name = "停车区域ID")
    private String parkAreaId;

    /** 停车区域名称 */
    @Excel(name = "停车区域名称")
    private String parkAreaName;

    /** 车位ID */
    @Excel(name = "车位ID")
    private String parkSpaceId;

    /** 车位编号 */
    @Excel(name = "车位编号")
    private String parkSpaceNo;

    /** 下级平台ID */
    @Excel(name = "下级平台ID")
    private String platformId;

    /** 车牌号码 */
    @Excel(name = "车牌号码")
    private String carNum;

    /** 车牌颜色 */
    @Excel(name = "车牌颜色")
    private Integer carNumColor;

    /** 车辆类型 */
    @Excel(name = "车辆类型")
    private Integer carType;

    /** 入场闸机ID */
    @Excel(name = "入场闸机ID")
    private String entryGateId;

    /** 入场闸机名称 */
    @Excel(name = "入场闸机名称")
    private String entryGateName;

    /** 出场闸机ID */
    @Excel(name = "出场闸机ID")
    private String exitGateId;

    /** 出场闸机名称 */
    @Excel(name = "出场闸机名称")
    private String exitGateName;

    /** 识别摄像头ID */
    @Excel(name = "识别摄像头ID")
    private String cameraId;

    /** 入场时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "入场时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime entryTime;

    /** 出场时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "出场时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime exitTime;

    /** 预计出场时间（预约用） */
    @Excel(name = "预计出场时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expectedExitTime;

    /** 总停车分钟数 */
    @Excel(name = "总停车分钟数")
    private Long totalMinutes;

    /** 免费分钟数 */
    @Excel(name = "免费分钟数")
    private Long freeMinutes;

    /** 计费分钟数 */
    @Excel(name = "计费分钟数")
    private Long chargeMinutes;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime completeTime;

    /** 取消时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cancelTime;

    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal totalAmount;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal actualAmount;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal payAmount;

    /** 支付方式：1-微信H5 2-微信小程序 3-支付宝H5 4-支付宝小程序 5-银联 6-现金 7-月卡抵扣 8-优惠券 */
    @Excel(name = "支付方式")
    private Integer payMethod;

    /** 支付渠道交易号 */
    @Excel(name = "支付渠道交易号")
    private String transNo;

    /**
     * 支付用户id
     * 支付宝/微信 openId
     */
    @Excel(name = "支付用户id")
    private String uniqueId;

    /**
     * 发放记录ID
     */
    @Excel(name = "发放记录id")
    private Long issueId;

    /** 发票状态：0-未开票 1-已申请 2-已开票 */
    @Excel(name = "发票状态")
    private Integer invoiceStatus;

    /** 发票ID */
    @Excel(name = "发票ID")
    private Long invoiceId;

    /**
     * 部门ID
     */
    @Excel(name = "部门ID")
    private Long deptId;

    /** 删除标志（0存在 1删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setOrderStatus(Integer orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Integer getOrderStatus() 
    {
        return orderStatus;
    }
    public void setOrderType(Integer orderType) 
    {
        this.orderType = orderType;
    }

    public Integer getOrderType() 
    {
        return orderType;
    }
    public void setParkCode(String parkCode)
    {
        this.parkCode = parkCode;
    }

    public Long getParkId() {
        return parkId;
    }

    public void setParkId(Long parkId) {
        this.parkId = parkId;
    }

    public String getParkCode()
    {
        return parkCode;
    }
    public void setParkName(String parkName)
    {
        this.parkName = parkName;
    }

    public String getParkName() 
    {
        return parkName;
    }
    public void setParkAreaId(String parkAreaId) 
    {
        this.parkAreaId = parkAreaId;
    }

    public String getParkAreaId() 
    {
        return parkAreaId;
    }
    public void setParkAreaName(String parkAreaName) 
    {
        this.parkAreaName = parkAreaName;
    }

    public String getParkAreaName() 
    {
        return parkAreaName;
    }
    public void setParkSpaceId(String parkSpaceId) 
    {
        this.parkSpaceId = parkSpaceId;
    }

    public String getParkSpaceId() 
    {
        return parkSpaceId;
    }
    public void setParkSpaceNo(String parkSpaceNo) 
    {
        this.parkSpaceNo = parkSpaceNo;
    }

    public String getParkSpaceNo() 
    {
        return parkSpaceNo;
    }
    public void setCarNum(String carNum) 
    {
        this.carNum = carNum;
    }

    public String getCarNum() 
    {
        return carNum;
    }
    public void setCarNumColor(Integer carNumColor) 
    {
        this.carNumColor = carNumColor;
    }

    public Integer getCarNumColor() 
    {
        return carNumColor;
    }
    public void setCarType(Integer carType) 
    {
        this.carType = carType;
    }

    public Integer getCarType() 
    {
        return carType;
    }
    public void setEntryGateId(String entryGateId) 
    {
        this.entryGateId = entryGateId;
    }

    public String getEntryGateId() 
    {
        return entryGateId;
    }
    public void setEntryGateName(String entryGateName) 
    {
        this.entryGateName = entryGateName;
    }

    public String getEntryGateName() 
    {
        return entryGateName;
    }
    public void setExitGateId(String exitGateId) 
    {
        this.exitGateId = exitGateId;
    }

    public String getExitGateId() 
    {
        return exitGateId;
    }
    public void setExitGateName(String exitGateName) 
    {
        this.exitGateName = exitGateName;
    }

    public String getExitGateName() 
    {
        return exitGateName;
    }
    public void setCameraId(String cameraId) 
    {
        this.cameraId = cameraId;
    }

    public String getCameraId() 
    {
        return cameraId;
    }
    public void setEntryTime(LocalDateTime entryTime)
    {
        this.entryTime = entryTime;
    }

    public LocalDateTime getEntryTime()
    {
        return entryTime;
    }
    public void setExitTime(LocalDateTime exitTime)
    {
        this.exitTime = exitTime;
    }

    public LocalDateTime getExitTime()
    {
        return exitTime;
    }
    public void setExpectedExitTime(LocalDateTime expectedExitTime)
    {
        this.expectedExitTime = expectedExitTime;
    }

    public LocalDateTime getExpectedExitTime()
    {
        return expectedExitTime;
    }
    public void setTotalMinutes(Long totalMinutes) 
    {
        this.totalMinutes = totalMinutes;
    }

    public Long getTotalMinutes()
    {
        return totalMinutes;
    }
    public void setFreeMinutes(Long freeMinutes)
    {
        this.freeMinutes = freeMinutes;
    }

    public Long getFreeMinutes()
    {
        return freeMinutes;
    }
    public void setChargeMinutes(Long chargeMinutes) 
    {
        this.chargeMinutes = chargeMinutes;
    }

    public Long getChargeMinutes() 
    {
        return chargeMinutes;
    }
    public void setPayTime(LocalDateTime payTime)
    {
        this.payTime = payTime;
    }

    public LocalDateTime getPayTime()
    {
        return payTime;
    }
    public void setCompleteTime(LocalDateTime completeTime)
    {
        this.completeTime = completeTime;
    }

    public LocalDateTime getCompleteTime()
    {
        return completeTime;
    }
    public void setCancelTime(LocalDateTime cancelTime)
    {
        this.cancelTime = cancelTime;
    }

    public LocalDateTime getCancelTime()
    {
        return cancelTime;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }
    public void setDiscountAmount(BigDecimal discountAmount) 
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() 
    {
        return discountAmount;
    }
    public void setActualAmount(BigDecimal actualAmount) 
    {
        this.actualAmount = actualAmount;
    }

    public BigDecimal getActualAmount() 
    {
        return actualAmount;
    }
    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }
    public void setPayMethod(Integer payMethod)
    {
        this.payMethod = payMethod;
    }

    public Integer getPayMethod()
    {
        return payMethod;
    }
    public void setTransNo(String transNo) 
    {
        this.transNo = transNo;
    }

    public String getTransNo() 
    {
        return transNo;
    }
    public void setInvoiceStatus(Integer invoiceStatus) 
    {
        this.invoiceStatus = invoiceStatus;
    }

    public Integer getInvoiceStatus() 
    {
        return invoiceStatus;
    }
    public void setInvoiceId(Long invoiceId)
    {
        this.invoiceId = invoiceId;
    }

    public Long getInvoiceId()
    {
        return invoiceId;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public String getPlatformId() {
        return platformId;
    }

    public void setPlatformId(String platformId) {
        this.platformId = platformId;
    }

    public String getUniqueId() {
        return uniqueId;
    }

    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getIssueId() {
        return issueId;
    }

    public void setIssueId(Long issueId) {
        this.issueId = issueId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("orderStatus", getOrderStatus())
            .append("orderType", getOrderType())
            .append("parkId", getParkId())
            .append("parkCode", getParkCode())
            .append("parkName", getParkName())
            .append("parkAreaId", getParkAreaId())
            .append("parkAreaName", getParkAreaName())
            .append("parkSpaceId", getParkSpaceId())
            .append("parkSpaceNo", getParkSpaceNo())
            .append("platformId", getPlatformId())
            .append("carNum", getCarNum())
            .append("carNumColor", getCarNumColor())
            .append("carType", getCarType())
            .append("entryGateId", getEntryGateId())
            .append("entryGateName", getEntryGateName())
            .append("exitGateId", getExitGateId())
            .append("exitGateName", getExitGateName())
            .append("cameraId", getCameraId())
            .append("entryTime", getEntryTime())
            .append("exitTime", getExitTime())
            .append("expectedExitTime", getExpectedExitTime())
            .append("totalMinutes", getTotalMinutes())
            .append("freeMinutes", getFreeMinutes())
            .append("chargeMinutes", getChargeMinutes())
            .append("payTime", getPayTime())
            .append("completeTime", getCompleteTime())
            .append("cancelTime", getCancelTime())
            .append("totalAmount", getTotalAmount())
            .append("discountAmount", getDiscountAmount())
            .append("actualAmount", getActualAmount())
            .append("payAmount", getPayAmount())
            .append("payMethod", getPayMethod())
            .append("transNo", getTransNo())
            .append("uniqueId", getUniqueId())
            .append("issueId", getIssueId())
            .append("invoiceStatus", getInvoiceStatus())
            .append("invoiceId", getInvoiceId())
            .append("deptId", getDeptId())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
